package com.boatAnchorAssistant.service.controller.test;


import com.boatAnchorAssistant.service.service.in.UserOperationLogService;
import nirvana.core.domains.ann.Operation;
import nirvana.core.domains.vo.ApiResult;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 *  test/操作日志
 * 【描 述】：
 * 【环 境】：J2SE 17
 * 【详 细】：
 *
 * @author 李松林
 * @version v1.0 2023/11/21 新建
 * @since 2023/11/21
 */
@RestController
@RequestMapping("/userOperationLog/test")
public class UserOperationTestController {

    private final UserOperationLogService service;

    public UserOperationTestController(UserOperationLogService service) {
        this.service = service;
    }


    /**
     * 操作类型测试
     * @param param
     * @return
     */
    @Operation(type = "测试", value = "操作日志测试")
    @PostMapping("/testOperationLog")
    public ApiResult testOperationLog(@RequestBody Map<String, String> param) {

        return ApiResult.ok();
    }


    /**
     * 手动消费操作日志
     * @return
     */
    @GetMapping("/recordOperationLog")
    public ApiResult recordOperationLog(){
        service.recordOperationLog();
        return ApiResult.ok();
    }

}
